package com.iring.exception.config;

/**
 * 应用系统级别的错误码
 *
 * @author wanggan
 */
public enum ErrorEnum {
    // user
    INVALID_SMS_CODE("202", "invalid sms code"),
    USERNAME_OR_PASSWORD_ERROR("204", "username or password error"),
    MODIFY_FAILED("208", "modify failed"),
    INVALID_PRIMARY_PASSWORD("209", "invalid primary password"),
    USER_NOT_AUTHENTION("300", "user not authention"),
    USER_NOT_AUTHENTION_MODIFY("301", "modify peroid must be more than 30 days"),
    UPLOAD_FILE_FAILED("305", "upload file failed"),
    INVALID_MAC("307", "invalid mac"),
    BUY_PACKAGE_FAILED("312", "buy suite failed"),
    DELETE_PACKAGE_FAILED("311", "delete suite failed"),
    GET_PACKAGE_INFO_FAILED("406", "get suite info failed"),
    AMOUNT_NOT_ENOUGH("313", "amount not enough"),
    OPT_TOO_MANY_TIMES("314", "operation too many times"),
    INVALID_TOKEN("315", "invalid token"),
    INVALID_IRINGTEL_NUMBER("316","invalid iringtel number"),
    NETWORK_EXCEPTION("317", "network timeout exception"),
    PAY_FAILED("321", "pay failed"),
    PAY_AMOUNT_DIFF("322", "pay amount different"),
    DEVICE_OFFLINE("323", "device offline"),
    CURRENT_VERSION_DIFF("326", "current version less than client version"),
    LINK_FAILED("327", "link failed"),
    DDNS_ALREADY_EXIST("328", "ddns already exist"),
    OPEN_GROUP_NETWORK_FAILED("331", "open group network failed"),
    CLOSE_GROUP_NETWORK_FAILED("332", "unsubcrible group netword failed"),
    USER_UNCHECK_CODE_ERROR("406", "please get a sms code first"),
    INVALID_USERNAME("407","invalid username"),
    INVALID_IMAGE_CODE("408","invalid image code"),
    INVALID_CONTACT_PHONENUM("409","invalid contact phone number"),
    UNCOMPLETE_ORDER_MORE_THAN_LIMIT("410","unfinish"),
    CREATE_ORDER_FAILED("411","create order failed"),
    CANCEL_ORDER_FAILED("412","cancel order failed"),
    DUPLICATE_DEVICEUSERNAME("413","duplicate deviceusername");

    private String code;

    private String msg;

    ErrorEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
